// src/store/index.js
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

// 导入模块
import { useAppStore } from './modules/app'
import { useUserStore } from './modules/user'

// 创建 pinia 实例
const pinia = createPinia()

// 使用持久化插件
pinia.use(piniaPluginPersistedstate)

export {
  useAppStore,
  useUserStore
}

export default pinia